package xyz.zhzby.cyzx.ucenter.convert;

import io.swagger.annotations.ApiModel;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.factory.Mappers;
import xyz.zhzby.cyzx.ucenter.dto.response.UserResponse;
import xyz.zhzby.cyzx.security.entity.User;


/**
 * @author zby
 * @date 2021/12/08
 */
@ApiModel("用户相关转换器")
@Mapper(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface UserConvert {

    UserConvert INSTANCE = Mappers.getMapper(UserConvert.class);

    UserResponse USER_RESPONSE(User user);

    User USER_USER(xyz.zhzby.cyzx.ucenter.entity.User user);

}
